home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / memory / src / addmemhandler.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.3 KB  |  65 lines

  1. /*
  2.     (C) 1995 AROS - The Amiga Replacement OS
  3.     $Id: addmemhandler.c 1.1 1995/11/14 22:31:07 digulla Exp digulla $
  4.     $Log: addmemhandler.c $
  5.  * Revision 1.1  1995/11/14  22:31:07  digulla
  6.  * Initial revision
  7.  *
  8.     Desc:
  9.     Lang: english
  10. */
  11. #include "exec_intern.h"
  12.  
  13. /*****************************************************************************
  14.  
  15.     NAME */
  16.     #include <exec/interrupts.h>
  17.     #include <clib/exec_protos.h>
  18.  
  19.     __AROS_LH1(void, AddMemHandler,
  20.  
  21. /*  SYNOPSIS */
  22.     __AROS_LA(struct Interrupt *, memHandler, A1),
  23.  
  24. /*  LOCATION */
  25.     struct ExecBase *, SysBase, 129, Exec)
  26.  
  27. /*  FUNCTION
  28.     Add some function to be called if the system is low on memory.
  29.  
  30.     INPUTS
  31.     memHandler - An Interrupt structure to add to the low memory
  32.              handler list.
  33.  
  34.     RESULT
  35.  
  36.     NOTES
  37.  
  38.     EXAMPLE
  39.  
  40.     BUGS
  41.  
  42.     SEE ALSO
  43.     RemMemHandler()
  44.  
  45.     INTERNALS
  46.  
  47.     HISTORY
  48.     08-10-95    created by m. fleischer
  49.     26-10-95    digulla adjusted to new calling scheme
  50.  
  51. ******************************************************************************/
  52. {
  53.     __AROS_FUNC_INIT
  54.  
  55.     /* Protect the low memory handler list */
  56.     Forbid ();
  57.  
  58.     /* Nothing spectacular: Just add the new node */
  59.     Enqueue ((struct List *)&SysBase->ex_MemHandlers, &memHandler->is_Node);
  60.  
  61.     Permit ();
  62.     __AROS_FUNC_EXIT
  63. } /* AddMemHandler */
  64.  
  65.